package com.niiwoo.civet.trade.dao.mapper;

import com.niiwoo.civet.trade.dao.entity.ProjectPackageDetail;
import com.niiwoo.civet.trade.dto.request.intelligenceInvest.IntelligenceInvestCombinationRequestDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface ProjectPackageDetailMapperExt extends ProjectPackageDetailMapper {

    List<ProjectPackageDetail> selectProjectPackageDetailByPackageId(Long packageId);

    ProjectPackageDetail selectProjectPackageDetailByProjectId(@Param("projectId")Long projectId);

    List<Long> selectProjectIdByPackageId(Long packageId);

    /**
     * 分页查询projectId
     * @param dto
     * @return
     */
    List<Long> selectProjectIdsPage(@Param("params") IntelligenceInvestCombinationRequestDTO dto);

    /**
     * 查询包下面的标的数量
     * @param packageId
     * @return
     */
    Integer selectProjectIdsCount(Long packageId);

    Long selectPackageIdByProjectId(Long projectId);
}